Skip to content

Comments

[OT-86][REFACTOR]: ERD 수정에 따른 백오피스 시리즈 관리 페이지 API 변경#52

Merged
phonil merged 7 commits intodevelopfrom
OT-86-refactor/backoffice-series
Feb 21, 2026
Merged

[OT-86][REFACTOR]: ERD 수정에 따른 백오피스 시리즈 관리 페이지 API 변경#52
phonil merged 7 commits intodevelopfrom
OT-86-refactor/backoffice-series

Conversation

@phonil
Copy link
Contributor

@phonil phonil commented Feb 21, 2026

📝 작업 내용

이번 PR에서 작업한 내용을 적어주세요

  • 시리즈 목록 조회 (검색 포함)
  • 시리즈 상세 조회

📷 스크린샷

[시리즈 목록 조회]
image

[시리즈 상세 조회]
image

☑️ 체크 리스트

체크 리스트를 확인해주세요

  • 테스트는 잘 통과했나요?
  • 충돌을 해결했나요?
  • 이슈는 등록했나요?
  • 라벨은 등록했나요?

#️⃣ 연관된 이슈

ex) # 이슈번호

closes #46

💬 리뷰 요구사항

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 예외 처리를 이렇게 해도 괜찮을까요? / ~~부분 주의 깊게 봐주세요

시리즈 관리 페이지 API 수정했습니다.
[공통]
목록 조회, 상세 조회 모두 mediaId를 반환합니다.

  1. 시리즈 목록 조회 시에 각 시리즈의 mediaId를 반환합니다. 이를 통해 상세 조회 시 사용합니다.
  2. 시리즈 상세 조회 시에는 mediaId를 사용하여 시리즈, 태그를 한 번에 조회합니다.

#31
위 PR에서의 수정 사항 반영입니다.

Summary by CodeRabbit

릴리스 노트

  • Refactor
    • 시리즈 상세 조회 API의 경로 매개변수명이 seriesId에서 mediaId로 변경되었습니다.
    • 시리즈 목록 응답의 필드명이 seriesId에서 mediaId로 변경되었습니다.
    • 백엔드 데이터 접근 계층을 재구성하여 안정성과 성능을 개선했습니다.

@phonil phonil self-assigned this Feb 21, 2026
@phonil phonil added feat 새로운 기능 구현 refactor 코드 구조 개선 (기능 변화 없음) labels Feb 21, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 21, 2026

📝 Walkthrough

Walkthrough

백오피스 시리즈 관리 API를 ERD 변경에 맞춰 리팩토링합니다. Series 중심에서 Media 중심 구조로 전환하며, API 파라미터를 seriesId에서 mediaId로 변경하고, 매퍼 및 서비스 로직과 저장소를 Media/MediaTag 기반으로 업데이트합니다.

Changes

Cohort / File(s) Summary
API 계층 매개변수 변경
apps/api-admin/src/main/java/com/ott/api_admin/series/controller/BackOfficeSeriesApi.java, apps/api-admin/src/main/java/com/ott/api_admin/series/controller/BackOfficeSeriesController.java
API 엔드포인트 매개변수를 seriesId에서 mediaId로 변경하고, @Parameter 설명을 "시리즈 ID"에서 "미디어 ID"로 업데이트. 경로 매핑도 {seriesId}에서 {mediaId}로 변경.
DTO 필드명 변경
apps/api-admin/src/main/java/com/ott/api_admin/series/dto/response/SeriesListResponse.java
SeriesListResponse의 필드를 seriesId에서 mediaId로 변경하고, Swagger 스키마 설명을 업데이트.
매퍼 로직 리팩토링
apps/api-admin/src/main/java/com/ott/api_admin/series/mapper/BackOfficeSeriesMapper.java
매퍼 메서드 시그니처를 Series/SeriesTag 대신 Media/MediaTag를 사용하도록 변경. toSeriesListResponse와 toSeriesDetailResponse 메서드를 Media 기반으로 재구성하고, 헬퍼 메서드도 MediaTag를 사용하도록 업데이트.
서비스 레이어 리팩토링
apps/api-admin/src/main/java/com/ott/api_admin/series/service/BackOfficeSeriesService.java
서비스를 Series 중심에서 Media 중심으로 전환. getSeries 메서드는 Media의 SERIES 타입을 페이지네이션하고, getSeriesDetail은 mediaId를 기반으로 Series, Media, 업로더 정보를 함께 조회.
미디어 저장소 신규 추가
modules/domain/src/main/java/com/ott/domain/media/repository/MediaRepository.java, modules/domain/src/main/java/com/ott/domain/media/repository/MediaRepositoryCustom.java, modules/domain/src/main/java/com/ott/domain/media/repository/MediaRepositoryImpl.java
Media 엔티티용 JPA 저장소 인터페이스와 QueryDSL 기반의 커스텀 구현 추가. MediaType과 검색어로 필터링된 페이지네이션된 Media 목록 조회 메서드 제공.
미디어 태그 저장소 신규 추가
modules/domain/src/main/java/com/ott/domain/media_tag/repository/MediaTagRepository.java, modules/domain/src/main/java/com/ott/domain/media_tag/repository/MediaTagRepositoryCustom.java, modules/domain/src/main/java/com/ott/domain/media_tag/repository/MediaTagRepositoryImpl.java
MediaTag 엔티티용 JPA 저장소 인터페이스와 QueryDSL 기반의 커스텀 구현 추가. mediaId 기반으로 태그와 카테고리를 함께 조회하는 메서드 제공.
시리즈 저장소 업데이트
modules/domain/src/main/java/com/ott/domain/series/repository/SeriesRepository.java, modules/domain/src/main/java/com/ott/domain/series/repository/SeriesRepositoryCustom.java, modules/domain/src/main/java/com/ott/domain/series/repository/SeriesRepositoryImpl.java
SeriesRepository를 활성화하고, 커스텀 메서드를 변경. 페이지네이션 기반의 findSeriesList를 제거하고, mediaId를 기반으로 Series, Media, 업로더를 함께 조회하는 findWithMediaAndUploaderByMediaId 메서드 추가.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • marulog
  • arlen02-01

Poem

🐰 Media 중심으로 춤을 춘다네,
시리즈는 태그와 함께 재탄생하고,
mediaId는 새로운 길을 밝히며,
쿼리와 매퍼가 조화를 이루고,
백오피스는 더욱 우아하게 변신했네! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 ERD 수정에 따른 백오피스 시리즈 관리 페이지 API 변경을 명확하게 설명하며, 변경 사항의 주요 내용과 완전히 일치합니다.
Linked Issues check ✅ Passed PR의 모든 코딩 요구사항이 충족되었습니다: 시리즈 목록 조회 API (#46에서 명시), 시리즈 검색 API, 시리즈 상세 조회 API가 mediaId 기반으로 구현되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 ERD 수정에 따른 API 변경 범위 내에 있으며, mediaId 도입 및 Media/MediaTag 리포지토리 추가가 필요한 범위 내 변경입니다.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch OT-86-refactor/backoffice-series

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
modules/domain/src/main/java/com/ott/domain/series/repository/SeriesRepository.java (1)

15-22: 주석으로 남은 폐기 쿼리 코드는 정리해도 됩니다.

현재 비활성화된 코드가 유지보수에 불필요한 잡음을 줄 수 있습니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@modules/domain/src/main/java/com/ott/domain/series/repository/SeriesRepository.java`
around lines 15 - 22, Remove the commented-out deprecated query block in
SeriesRepository: delete the entire commented `@Query` and the searchLatest method
signature (the commented lines referencing searchLatest, `@Query`,
`@Param`("keyword"), `@Param`("status"), and Pageable) to eliminate dead code noise
and keep the repository clean.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@modules/domain/src/main/java/com/ott/domain/series/repository/SeriesRepository.java`:
- Around line 15-22: Remove the commented-out deprecated query block in
SeriesRepository: delete the entire commented `@Query` and the searchLatest method
signature (the commented lines referencing searchLatest, `@Query`,
`@Param`("keyword"), `@Param`("status"), and Pageable) to eliminate dead code noise
and keep the repository clean.

Copy link
Collaborator

@marulog marulog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다 :)

@phonil phonil merged commit b72cb2b into develop Feb 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat 새로운 기능 구현 refactor 코드 구조 개선 (기능 변화 없음)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[OT-86] [REFACTOR]: 백오피스 시리즈 관리 페이지 API 수정

2 participants